<template>
  <div class="charts" ref="charts">
  </div>
</template>

<script>
import * as echarts from 'echarts';
export default {
  name: 'BarCharts',
  mounted () {
    //初始化echarts实例
    let lineCharts = echarts.init(this.$refs.charts);
    //配置数据
    lineCharts.setOption({
      xAxis: {
        show: false,
        type: 'category'
      },
      yAxis: {
        show: false
      },
      series: [
        {
          type: 'bar',

          data: [10, 20, 33, 20, 38, 19, 29, 10,15,29,16],
        },
      ],
      //布局调整
      grid: {
        left: 0,
        top: 0,
        right: 0,
        bottom: 0
      },
      toolTip:{
        triggerOn:'axis'
      }
    })
  }
}
</script>

<style scoped>
.charts {
  height: 100%;
  width: 100%;
}
</style>